<!--
 * @Author: your name
 * @Date: 2021-10-16 08:56:37
 * @LastEditTime: 2021-10-16 09:17:08
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /a1902-a-group/admin_pc/src/component/Teleport.vue
-->
<template>
  <div>
      <span>Teleport</span>

      <div class="box">
          <button @click="isShow = !isShow">打开</button>
          <teleport to="#app">
            <div class="mask" v-show="isShow"></div>
          </teleport>
      </div>


      <div @click="updatas">
          {{name}}
      </div>
  </div>
</template>

<script>
import {myMixins} from '../mixin/home'
export default {
    mixins: [myMixins],
    data() {
        return {
            isShow: false,
            // name: 'zxd'
        }
    },
}
</script>

<style>
.box{
    position: relative;
    width: 200px;
    height: 200px;
    background: pink;
}
.mask {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}
</style>